home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 2046 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.1 KB

  1. Path: news.production.compuserve.com!news
  2. From: Tal Garfinkel <73400.667@CompuServe.COM>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Question!@#!
  5. Date: 18 Jan 1996 19:09:27 GMT
  6. Organization: CompuServe, Inc. (1-800-689-0736)
  7. Message-ID: <4dm5t7$t93$2@mhafc.production.compuserve.com>
  8. References: <DLBGw1.CpA@news.cern.ch>
  9.  
  10. I have created a program that asks THE users for his name, then
  11. writes it 
  12. >to a file, the file is called name.txt..
  13. >
  14. >Evertime this program is executed, the file name.txt get's
  15. overwritten.
  16. >
  17. >How can i keep this file, name.txt, so that i can eventually
  18. have a 
  19. >listing of all users who ran my program???
  20. >
  21. >Appreciated..
  22.  
  23. no problem,
  24.  you are probably opening your file in write mode with 
  25.  like fopen(fp, "w") when you should be opening it in append mode 
  26.  with fopen(fp,"a") look up fopen in a C book for more details.
  27.  
  28.  simple solution is to switch to VAX/VMS.  A new 'name.txt'
  29. file will have a different version number in its file system.
  30.  
  31.  Accept then you would have to use the Vomit Making System(VMS)
  32.  the most God forsaken waste of code known to man.
  33. (sorry I couldnt resist)
  34.